<template>
  <div class='wrapper'>
    <el-form ref="form" :model="formData" label-width="100px">
      <el-form-item label="项目名称">
        <el-input v-model="formData.objectName"></el-input>
      </el-form-item>
      <el-form-item label="项目日期">
        <el-date-picker type="date" placeholder="选择日期" v-model="formData.objectDate" style="width: 100%;"></el-date-picker>
      </el-form-item>
      <el-form-item label="开始时间">
        <el-date-picker type="date" placeholder="选择日期" v-model="formData.startTime" style="width: 100%;"></el-date-picker>
      </el-form-item>
      <el-form-item label="结束时间">
        <el-time-picker placeholder="选择时间" v-model="formData.endTime" style="width: 100%;"></el-time-picker>
      </el-form-item>
      <el-form-item label="项目负责人" >
        <el-input v-model="formData.leadersName"></el-input>
      </el-form-item>
      <el-form-item label="项目参与人">
        <el-input v-model="formData.personName"></el-input>
      </el-form-item>
      <el-form-item label="项目金额">
        <el-input v-model="formData.moneny"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">确定</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
  export default {
    props: ['data'],
    data() {
      return {
        form: {
        }
      }
    },
    computed: {
      formData(){
        return this.data
      }
    },
    methods: {
      onSubmit() {
        this.$emit('confirm', this.formData);
      }
    }
  }
</script>